A= int(input())	
for a in range(1,A+1):	
        if a==1:	
                for b in range(A-a,0,-1):	
                        print(" ",end="")	
                print(1)
        else:
                for b in range(A-a,0,-1) :
                        print(" ",end="") 
                for b in range(a,0,-1):
                        if b==1:
                                print(b,end="")
                        else:
                                print(b,end="")
                for b in range(2,a+1):
                        if b==a:
                                print("%s"%b)
                        else:
                                print("%s"%b,end="")	
